<%-- 
    Document   : dao4
    Created on : 2014/8/20, 下午 03:28:41
    Author     : sally
--%>


<%@page import="java.util.ArrayList"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<jsp:useBean class="dao.BaseDAO" id="y" />
<%
    String sql="select id,username,tel,birthday from person";
    String ary[ ]={};
    ArrayList list=y.query(sql, ary);
    System.out.println(list);
   // request.setAttribute("list", list);
%>
<c:set var="list" value="<%= list %>" />
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>dao4</title>
    </head>
    <body>
        <h1>dao4</h1>
	<c:forEach var="x" items="${list}">
	    ${x.id},${x.username},${x.tel},${x.birthday}<br>
	    
	</c:forEach>
    </body>
</html>
